/**
 * Title: RoleServiceImp.java
 * @author wujin
 * @date 2019年12月30日
 * @version 1.0
 */
package com.pm.service.security.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.pm.entity.po.security.Group;
import com.pm.mapper.security.GroupMapper;
import com.pm.service.impl.BaseServiceImpl;
import com.pm.service.security.GroupService;

/**
 * Title: RoleServiceImp
 * 
 * @author wujin
 * @date 2019年12月30日
 */
@Service
public class GroupServiceImpl extends BaseServiceImpl<Group> implements GroupService {

	private GroupMapper groupMapper;

	@Resource
	public void setBasemapper(GroupMapper groupMapper) {
		this.groupMapper = groupMapper;
		super.setBaseMapper(groupMapper);
	}

	/*
	 * (non-Javadoc) <p>Title: insertBatch</p> <p>Description: </p>
	 * 
	 * @param roleId
	 * 
	 * @param permissions
	 * 
	 * @return
	 * 
	 * @see com.scs.service.security.RoleService#insertBatch(java.lang.Integer, java.util.List)
	 */
	@Override
	public Integer insertBatch(Integer groupId, List<Integer> permissions) {
		groupMapper.removeGroupPer(groupId);
		int i=groupMapper.insertBatch(groupId, permissions);
		return i;
	}

}
